import { createApp } from "vue";
import App from "./App.vue";

import "./registerServiceWorker";
// Router
import router from "./router";

// Vuex
import store from "./store";

// Elememt Plus
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "./scss/index.scss";

// 国际化
import i18n from "@/languages";

// 统一修改配置
import { SetConfig } from "@/config/SetConfig"
SetConfig()

import { directive } from "@/library/utils/directive" // 全局指令

const app = createApp(App);
directive(app)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(router);
app.use(store);
app.use(ElementPlus);
app.use(i18n);

app.mount("#app");